import request from '@/config/axios'

// 声纹三方 API
export const AlgengineApi = {
  // 查询计算节点列表
  getComputeNodeList: async (data: any) => {
    return await request.post({ url: `/algengine/v1/computeNode/list`, data })
  },

  //查询SAU配置模板列表接口
  getSauTemplate: async (data: any) => {
    return await request.post({ url: `/algengine/v1/sauTemplate/list`, data })
  },

  // 创建SAU接口
  createSau: async (data: any) => {
    return await request.post({ url: `/algengine/v1/sau/operation`, data })
  },

  // 删除SAU接口
  deleteSau: async (sauInstanceId: string) => {
    const data = {
      operateType: 2,
      sauInstanceId: sauInstanceId
    }
    return await request.post({ url: `/algengine/v1/sau/operation`, data })
  },

  // 查询SAU实例详情接口
  getSauDetail: async (data: any) => {
    return await request.post({ url: `/algengine/v1/sau/detail`, data })
  },

  //查询信号详情接口
  getSignalDetail: async (data: any) => {
    return await request.post({ url: `/algengine/v1/signalPool/signal/detail`, data })
  },

  //查询信号的实时数据接口
  getSignalRealtime: async (data: any) => {
    return await request.post({ url: `/algengine/v1/signalData/realtime`, data })
  },

  //查询信号的历史数据接口
  getSignalHistory: async (data: any) => {
    return await request.post({ url: `/algengine/v1/signalData/history`, data })
  },

  //查询原始数据文件接口
  getRawdataList: async (data: any) => {
    return await request.post({ url: `/algengine/v1/rawdata/list`, data })
  }
}
